home *** CD-ROM | disk | FTP | other *** search
/ ftp.cs.arizona.edu / ftp.cs.arizona.edu.tar / ftp.cs.arizona.edu / icon / newsgrp / group00b.txt / 000118_icon-group-sender_Fri Oct 27 12:29:56 2000.msg < prev    next >
Internet Message Format  |  2001-01-03  |  1KB

  1. Return-Path: <icon-group-sender>
  2. Received: (from root@localhost)
  3.     by baskerville.CS.Arizona.EDU (8.11.1/8.11.1) id e9RJTS526754
  4.     for icon-group-addresses; Fri, 27 Oct 2000 12:29:28 -0700 (MST)
  5. Message-Id: <200010271929.e9RJTS526754@baskerville.CS.Arizona.EDU>
  6. X-Sender: whm@mail.mse.com
  7. Date: Fri, 27 Oct 2000 01:57:58 -0700
  8. To: icon-group@cs.arizona.edu
  9. From: "William H. Mitchell" <whm@mse.com>
  10. Subject: Sweating over scanning?
  11. Errors-To: icon-group-errors@cs.arizona.edu
  12. Status: RO
  13. Content-Length: 907
  14.  
  15. Regarding this:
  16.  
  17. > >> line ? while tab(upto(&letters)) do move(1)
  18. >
  19. > > Intimidates? Sends you screaming come back awk, come back perl, all
  20. > > is forgiven?
  21.  
  22. One thing that I think helps to understand scanning is to realize that the
  23. scanning facility consists of just a handful of elements.  According to my
  24. notes, here they are:
  25.  
  26. Procedures for changing &pos:
  27.  
  28.  move(n)    relative adjustment; string result
  29.  tab(n)    absolute adjustment; string result
  30.  
  31. Procedures often used in conjunction with tab(n):
  32.  
  33.  upto(c)    generates positions of characters in c
  34.  many(c)    produces position after run of characters in c
  35.  find(s)    generates positions of s
  36.  match(s)    produces position after s, if s is next
  37.  any(c)    produces position after a character in c
  38.  
  39. Other procedures:
  40.  
  41.  pos(n)    tests if &pos is equivalent to n
  42.  
  43.  bal(s, c1, c2, c3) similar to upto(c), but used for working with
  44.                     "balanced" strings.
  45.